package com.wgl.yygh.task.schedule;

import com.wgl.rocket.service.RocketService;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author wgl
 * @version 1.0.0
 * @ClassName ScheduleTask.java
 * @Description TODO
 * @createTime 2022年02月16日 14:25:00
 */
@Component
@EnableScheduling
public class ScheduleTask {
    @Resource
    private RocketService rocketService;

//    @Scheduled(cron = "0 0 8 * * ? ")
    @Scheduled(cron = "0 5 15 * * ?")
    public void taskPatient(){
        System.out.println("开始发送短信提醒");
        rocketService.sendMessage("task",null);
    }
}
